import http from '@/http'
import qs from 'qs'

// 支付订单相关

// 订单列表
const payOrderList = (params) => {
    return http.get('v1/payOrders', {
        params,
        paramsSerializer: function (params) {
            return qs.stringify(params, { arrayFormat: 'brackets' })
        },
    })
}

// 退款
const refund = (id) => {
    return http.post(`v1/payOrders/${id}/refund`)
}

// 校验订单状态
const checkOrderStatus = (id) => {
    return http.post(`v1/payOrders/${id}/check`)
}
export { payOrderList, refund, checkOrderStatus }

